Record an Action Macro with the Action Recorder
 
 
 
Bottom of the Page

You use the Action Recorder to record commands and input values for an action macro.

While recording an action macro, the Red Recording Circle icon is displayed near the crosshairs to indicate that the Action Recorder is active and that commands and input are being recorded.

While recording, commands and input that is entered at the command line are recorded with the exception of commands that open or close drawing files. If a dialog box is displayed while recording an action macro, only the display of the dialog box is recorded and not the changes made to the dialog box. It is recommended that you do not use dialog boxes when recording an action macro. Use the command line version of the command instead. For example, use the -HATCH command instead of the HATCH command, which displays the Hatch and Gradient dialog box.

Once you are done recording an action macro, you then have the option to save or discard the recorded action macro. If you save the action macro, you must specify a name and optionally, a description and the playback settings for the action macro. The playback settings control if the view prior to the playback of the action macro is restored when a request for user input is made or when playback is complete.

When the Action Recorder is set to check for inconsistencies, it compares the settings of the drawing environment when the action macro was recorded against the current settings of the drawing environment. For example, the Action Recorder checks the value of the INSUNITS system variable in the current drawing against the value that was used when the action macro was recorded. If an inconsistency is found, you are given the option to continue playing back the action macro or to stop playback. If you continue playing back the action macro, the action macro might produce unexpected results.

Show Me: Record an Action Macro

Use Action Macros while Recording

You can play back an action macro while you are recording an action macro; you can combine multiple action macros together to create a new action macro. To use an existing action macro while recording another action macro, the action macro that you want to play back needs to be present in one of the paths defined by the system variables ACTPATH or ACTRECPATH. If the action macro is in one of the defined paths, enter the name of the action macro at the Command prompt to play it back.

Use Custom Commands and Routines with Action Macros

When recording commands and input, you can use the standard commands that come with AutoCAD and other custom commands that you might already use. The custom commands that you can use is not limited to just commands defined with AutoLISP or ObjectARX, but also includes commands defined with .NET and macros defined with VBA.

Before playing back an action macro that contains references to custom commands and macros, the original programs that define the commands and macros must be loaded into AutoCAD in order for the action macro to be played back correctly. To make sure the custom commands are available when an action macro is played back, you can use one or more of the following.

Store Recorded Action Macros

When you stop the recording of an action macro, you have the option to save the recorded action macro. If you save the recorded action macro, the command name specified for the action macro is also used as the file name of the action macro. The saved action macro is stored in the folder defined by the ACTRECPATH system variable. You can access the folder in the Options dialog box.

Procedure
To start recording an action macro
To stop the recording of an action macro
To cancel the recording of an action macro
To copy an action macro to create a new action macro
To change the location used to save a recorded action macro
Quick Reference
Commands
System Variables